package com.deyuanyun.pic.ae.enumeration;

/**
 * 相对位置关系 枚举
 * （交叉、平行）CROSS、PARALLEL
 *
 * @author huanglw
 * @date  2016-11-10
 *
 * History: [修改人][时间][修改描述]
 */
public enum PositionRelationEnum {

    CROSS("交叉"),
    PARALLEL("平行");

    private String label;

    PositionRelationEnum(String label){
        this.label = label;
    }

    public String getLabel() {
        return label;
    }

    public void setLabel(String label) {
        this.label = label;
    }

    public static String getLabel(String code){
        PositionRelationEnum[] positionRelationEnums = PositionRelationEnum.values();
        for (int i = 0; i < positionRelationEnums.length; i++) {
            if (positionRelationEnums[i].toString().equals(code)) {
                return positionRelationEnums[i].getLabel();
            }
        }
        return null;
    }
}
